package com.mt.repair.entity.repairManagement;

import javax.persistence.*;
import java.io.Serializable;
import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



import com.mt.common.system.entity.User;
import com.mt.repair.entity.repairManagement.Notice;

@DEntity(label="通知用户关联表",comment="",moduleLabel="报修管理")
@Entity(name="repair_notice_cat_user")
@Table(name = "repair_notice_cat_user" , indexes = { @Index(name = "index_notice_id", columnList = "notice_id"),@Index(name = "index_user_id", columnList = "user_id")  })
@ApiModel(description = "维修评价:")
public class NoticeCatUser extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	@DColumn(index=3,label="通知公告",foreignEntity="Notice",comment="通知公告",component="对象选择",where=false)
	@ApiModelProperty(value = "通知公告:通知公告")
	@Column(name="notice_id",length=255,nullable=true,unique=false)
	private Long noticeId;

	@Transient
	private Notice notice;

	@Transient
	@ApiModelProperty(value = "通知公告名称:通知公告")
	@DColumn(index=3,label="通知公告",foreignEntity="Notice",comment="通知公告")
	private String noticeName;

	@DColumn(index=4,label="用户",foreignEntity="User",comment="用户",component="对象选择",where=false)
	@ApiModelProperty(value = "用户:用户")
	@Column(name="user_id",length=255,nullable=false,unique=false)
	private Long userId;

	@Transient
	private User user;

	@Transient
	@ApiModelProperty(value = "用户名称:用户")
	@DColumn(index=4,label="用户",foreignEntity="User",comment="用户")
	private String userName;

	@DColumn(index=5,label="已读状态",comment="0已读，1未读",component="数字，整数",where=false)
	@ApiModelProperty(value = "已读状态:0已读，1未读")
	@Column(name="read_status",length=255,nullable=true,unique=false)
	private Integer readStatus;


	public Long getNoticeId() {
		return this.noticeId;
	}

	public void setNoticeId(Long noticeId) {
		this.noticeId = noticeId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Integer getReadStatus() {
		return this.readStatus;
	}

	public void setReadStatus(Integer readStatus) {
		this.readStatus = readStatus;
	}

	public Notice getNotice() {
		return this.notice;
	}

	public void setNotice(Notice notice) {
		if(notice == null){
		}
		else
		{
		this.noticeId = notice.getEid();
		this.notice = notice;		
		}
}

	public String getNoticeName() {
		return this.noticeName;
	}

	public void setNoticeName(String noticeName) {
		this.noticeName = noticeName;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		if(user == null){
		}
		else
		{
		this.userId = user.getEid();
		this.user = user;		
		}
}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}



}
